package com.yuedao.sender.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 * 
 *         网约车驾驶员培训信息接口
 */
@Entity
public class BaseInfoDriverEducate extends BaseEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1363943905634703542L;

	private int address;

	private String licenseId;

	private String courseName;

	private int courseDate;

	private String startTime;

	private String stopTime;

	private String duration;

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getLicenseId() {
		return licenseId;
	}

	public void setLicenseId(String licenseId) {
		this.licenseId = licenseId;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public int getCourseDate() {
		return courseDate;
	}

	public void setCourseDate(int courseDate) {
		this.courseDate = courseDate;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getStopTime() {
		return stopTime;
	}

	public void setStopTime(String stopTime) {
		this.stopTime = stopTime;
	}

	public String getDuration() {
		return duration;
	}

	public void setDuration(String duration) {
		this.duration = duration;
	}

	 public static OTIpcDef.BaseInfoDriverEducate convert(BaseInfoDriverEducate data){
	        OTIpcDef.BaseInfoDriverEducate item = OTIpcDef.BaseInfoDriverEducate.newBuilder()
	                .setCompanyId(data.getCompanyId())
	                .setAddress(data.getAddress())
	                .setLicenseId(data.getLicenseId())
	                .setCourseName(data.getCourseName())
	                .setCourseDate(Long.valueOf(data.getCourseDate()))
	                .setStartTime(data.getStartTime())
	                .setStopTime(data.getStopTime())
	                .setDuration(Integer.parseInt(data.getDuration()))
	                .setFlag(data.getFlag())
	                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
	                .build();

	        return item;
	    }
}
